from django.db import models

# Create your models here.

class Lab(models.Model):
    l_name = models.CharField(max_length=32,unique=True)
    floor = models.IntegerField()
    room = models.IntegerField()
    leader = models.ForeignKey('User',on_delete=models.CASCADE)


class Assets(models.Model):
    c_name = models.CharField(max_length=32,unique=True)
    description = models.TextField()
    number = models.CharField(max_length=32,unique=True)
    buy_time = models.DateField(auto_now_add=True)
    buy_user = models.ForeignKey('User',on_delete=models.CASCADE)
    laboratory = models.ForeignKey('Lab',on_delete=models.CASCADE)



class User(models.Model):
    username = models.CharField(max_length=32,unique=True)
    passerword = models.CharField(max_length=32)
    name = models.CharField(max_length=32)
    phone = models.CharField(max_length=32)